import React, { useState, useEffect } from 'react';
import 'antd/dist/antd.css'
import '../css/index.scss'
import { Table, Button, Select, Space, Modal,Form,Switch,Input,message,InputNumber } from 'antd';
import axios from '../../../../../http/index'


export default function Add(props) {
    console.log(props.seedatas);
    const [seedatas,setseedatas] = useState({
        couponName:props.seedatas.user,
        couponName2:props.seedatas.name,
        selects:props.seedatas.member,
        couponName3:props.seedatas.invitation,
        couponName4:props.seedatas.SuccessfulInvitation,
        couponName5:props.seedatas.reward,
    })
    const layout = {
        labelCol: { span: 5 },
        wrapperCol: { span: 19 },
    };
    const onFinish = (values) => {
        console.log(values);
    };
    return (
        <div>
              <Form {...layout} name="nest-messages"
                    onFinish={onFinish}
                    initialValues={{
                        ...seedatas
                    }}
                > 
                 <Form.Item name='couponName' label="用户账号" >
                        <Input   readOnly={true}/>
                    </Form.Item>
                    <Form.Item name='couponName2' label="用户昵称" >
                        <Input   readOnly={true}/>
                    </Form.Item>
                   
                    <Form.Item label="会员等级" name='selects' >
                        <Select placeholder="请选择分类名称" disabled getPopupContainer={triggerNode => triggerNode.parentNode}>
                            <Select.Option value={1}>普通会员</Select.Option>
                            <Select.Option value={2}>白银会员</Select.Option>
                            <Select.Option value={3}>黄金会员</Select.Option>
                            <Select.Option value={4}>钻石会员</Select.Option>
                        </Select>
                    </Form.Item>
                    <Form.Item name='couponName3' label="邀请的好友" >
                        <InputNumber style={{ width: '100%' }} addonAfter="个" readOnly={true}/>
                    </Form.Item>
                    <Form.Item name='couponName4' label="成功交易的好友" >
                        <InputNumber style={{ width: '100%' }} addonAfter="个" readOnly={true}/>
                    </Form.Item>
                    <Form.Item name='couponName5' label="累计奖励" >
                        <InputNumber style={{ width: '100%' }} addonAfter="元" readOnly={true}/>
                    </Form.Item>
                </Form>

        </div>
    )
}
